<template>
	<view>
		<uni-card @click="asd">账号与安全</uni-card>
		<uni-card>通用设置</uni-card>
		<uni-card>
		<view class="list-cell m-t">
			<text class="cell-tit">消息通知</text>
			<switch checked color="#fa436a" @change="switchChange" />
		</view>
		</uni-card>
		<uni-card @click="ddd">关于我们</uni-card>
		<uni-card @click="eee"><text class="cell-tit">检查更新</text>
		<text class="cell-tip">当前版本 1.0.3</text></uni-card>

		
		
       <view class="quit flex-center">
		    <view class="btn flex-center" @click="toLogout">
				<text>退出登录</text>
		      
		    </view>
		 </view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
			
			};
		},
		methods:{
            toLogout(){
				uni.showModal({
				    content: '确定要退出登录么',
				    success: (e)=>{
				    	if(e.confirm){
				    		this.logout();
				    		setTimeout(()=>{
				    			uni.navigateBack();
				    		}, 200)
				    	}
				    }
				});
			},
			asd(){
				uni.navigateTo({
					url:"/pages/my/set/account-security/account-security"
				})
			},
			ddd(){
				uni.navigateTo({
					url:"/pages/my/set/aboutus/aboutus"
				})
			},
			eee(){
				uni.navigateTo({
					url:"/pages/my/set/checkupdate/checkupdate"
				})
			}
		}
	}
</script>

<style lang="scss">
.quit{
  height: 100rpx;
  margin-top: 50px;
  .btn{
    background-color: #4f99ff;
    border-radius: 30px;
    width: 80%;
    color: white;
    font-size: 1.2em;
    height: 100%;
  }
}
.flex-center{
  display: flex;
  justify-content: center;
  align-items: center;
}
.list-cell{
		display:flex;
		align-items:baseline;
		line-height:60upx;
		position:relative;
		background: #fff;
		justify-content: center;
		.cell-tit{
			flex: 1;

			margin-right:10upx;
		}
		}		
		.cell-tip{
		  float: right;
		}
		switch{
			transform: translateX(16upx) scale(.84);
		}
</style>
